home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************************
- * *
- * ARexx script: ProAsm.ced v1.02 for the ProAsm Assembler *
- * *
- * This script assembles the source in the actual view of the CygnusEd using *
- * the ProAsm assembler and the ASX user interface. *
- * *
- * by Daniel Weber *
- * 26.May.93 *
- * *
- * Tue Jul 20 1993 cschneid: 'Beg Of File' added, jumping to 1st error *
- * *
- * *
- * Usage: ProAsm.ced *
- * *
- * *
- * How to run: *
- * *
- * 1) Activate the view of the source file. *
- * 2) Start this ARexx script via 'Send DOS/ARexx command...' *
- * *
- *****************************************************************************/
-
- editorID = 'CygnusEd' /* define editor ID */
-
- OPTIONS RESULTS
-
- ADDRESS 'rexx_ced' /* get some information from the CED */
- status 15
- fileadr = result /* file address of actual view */
- status 19
- name = result /* complete path and filename */
- status 57
- oldline = result /* current line numer */
-
- 'Beg Of File' /* ensure file is updated */
-
- ADDRESS 'asx_rexx'
- FindID editorID':'name
- port = result
- DO WHILE port~=''
- ADDRESS (''||port)
- EndOfAssembly /* quit all open jobs of this source */
- ADDRESS 'asx_rexx'
- FindID editorID':'name
- port = result
- END
-
-
- BegOfAssembly /* begin a new job */
- port = result
-
- IF port~='' THEN DO
- ADDRESS (''||port) /* ARexx weirdness */
- DefineID editorID':'name /* set an ID (optional) */
- Assemble ADDRESS fileadr
-
- PARSE VAR result . errors . warnings . optims optimbytes . codesize . workspace
-
-
- IF errors~=0 THEN DO /* jump to first error */
- NextError /* get next error */
- errortxt = result
-
- ADDRESS 'rexx_ced'
- IF errortxt ='' THEN DO
- Okay1 'no more errors'
- exit(0)
- END
-
- PARSE VALUE errortxt WITH 1 LineNumber ' : ' ErrorMsg ' in file ' filename
- IF filename ~='' THEN DO
- status 66
- DO numwins= result-1 TO 1 BY -1 UNTIL UPPER(result) = UPPER(filename)
- next view
- status 21
- END
- IF UPPER(result) ~= UPPER(filename) THEN DO
- split view
- open filename
- END
- END
- Jump To Line LineNumber
- Okay1 ErrorMsg
- END
-
- ELSE DO
- stat = codesize 'bytes.' '0A'X''optims 'optimizations saved' optimbytes 'bytes' '0A'X
- stat = stat''errors 'Errors,' warnings 'Warnings,' workspace 'bytes of workspace used.'
-
- ADDRESS 'rexx_ced'
- Jump To Line oldline
- Okay1 "File '"name"'"'0A'X"assembled to" stat
- END
- END
-
- EXIT(0)
-
-